// 管理员列表
import http from "@/utils/http";
//用户分组
export interface AdminItem {
    _id?: string;
    name?: string;
    state?: boolean;
    account?: string;
    password?: string;
    role?: string;
}

const admins = {
    // 查询用户分组数据
    search: (data?: pagequery) => http.post('/admins/search', data),
    // 新增用户分组数据
    add: (data: Partial<AdminItem>) => http.post('/admins/add', data),
    // 删除用户分组数据
    remove: (data: deleteparams) => http.delete('/admins/remove', data),
    // 修改用户分组数据
    update: (data: Partial<AdminItem>) => http.put('/admins/update', data),

    login: (data: { account: string, password: string }) => http.post('/admins/login', data),
    getInfo: () => http.get('/admins/getDetail')

}
export default admins;